/*
 * CMediaSound.cpp
 *
 *  Created on: Sep 6, 2011
 *      Author: welcome
 */

#include "CMediaSound.h"

namespace GGEngine {

CMediaSound::CMediaSound() {
	mediaType = 0;
	data = KD_NULL;
	length = 0;
}
CMediaSound::~CMediaSound() {
	UTIL_SAFE_DELETE_ARRAY(data);
}

void CMediaSound::setMediaType(int _mediaType) {
	mediaType = _mediaType;
}

int CMediaSound::getMediaType() {
	return mediaType;
}

void CMediaSound::attachData(char* _data, int _length) {
	data = _data;
	length = _length;
}

char* CMediaSound::getData() {
	return data;
}

int CMediaSound::getDataLength() {
	return length;
}

void CMediaSound::setLocation(const char* _location) {
	strcpy(location, _location);
}

const char* CMediaSound::getLocation() {
	return &location[0];
}

const pcmInfo_t* CMediaSound::getPcmInfo() {
	return &pcmHeader;
}
} /* namespace GGEngine */
